Simulation-based just-in-time training